<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>简介</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="book.sync.html">« Sync</a></li>
      <li style="float: right;"><a href="sync.setup.html">安装/配置 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.sync.html">Sync</a></li>
    <li>简介</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="intro.sync" class="preface">
  <h1 class="title">简介</h1>
  <p class="para">
 The &#039;sync&#039; extension introduces cross-platform synchonization objects into PHP.
 Named and unnamed Mutex, Semaphore, Event, Reader-Writer, and named Shared Memory
 objects provide OS-level synchronization on both POSIX (e.g. Linux) and Windows
 platforms.
  </p>
  <p class="para">
 Automatic cleanup of acquired synchronization objects takes place during extension
 teardown.  This means that if PHP prematurely terminates a script (e.g. script
 execution time is exceeded), objects will not be left in an unknown state.  The
 only exception to this is if PHP itself crashes (e.g. an internal buffer overflow).
  </p>
  <p class="para">
 Unnamed synchronization objects don&#039;t have a lot of use outside of a multithreaded
 scenario.  Unnamed objects are more useful in conjunction with the pthreads PECL
 extension.
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
 Named objects require additional care to be used on all systems.
 If an object is instantiated with a specific set of parameters, it must always
 be instantiated with those parameters or the object will probably end up in an
 inconsistent state until the next reboot or a system administrator cleans up
 the mess.
   </p>
  </p></blockquote>
 </div></div></div></body></html>